<?php

namespace App\Enums;

use BenSampo\Enum\Enum;

/**
 * @method static static OptionOne()
 * @method static static OptionTwo()
 * @method static static OptionThree()
 */
final class Gender extends Enum
{
    //状态:0=未知,1=男,2=女
    const UNKNOWN = 0;
    const MAN = 1;
    const WOMEN = 2;


    public static function getDescription(mixed $value): string
    {
        return match ($value) {
            self::UNKNOWN => '未知',
            self::MAN => '男',
            self::WOMEN => '女',
            default => self::getKey($value),
        };
    }
}
